package org.wgs.guide.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2015/5/19 0019.
 */
@Component
@ConfigurationProperties(prefix = "my")
public class MyBean implements CommandLineRunner {

    @Value("${my.secret}")
    private String secret;

    private List<String> n = new ArrayList<String>();

    public List<String> getN() {
        return n;
    }

    @Override
    public void run(String... strings) throws Exception {
        System.out.println("I am command line runner, my secret=" + secret + "n list=" + n);
    }
}
